common/gnttab: Correct error handling for gnttab_setup_table()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 20 Jun 2017 09:40:56 +0000 (10:40 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 15 Aug 2017 14:08:57 +0000 (15:08 +0100)
commit5e436e7a45082ea2cadc176c19e1df46c178448f
tree1438f695497d9ccf6d97d5da7a69021b7de2af47
parent9e051a840d7f7121118470a55d2d600b46be97f7
common/gnttab: Correct error handling for gnttab_setup_table()

Simplify the error labels to just "unlock" and "out".  This fixes an erroneous
path where a failure of rcu_lock_domain_by_any_id() still results in
rcu_unlock_domain() being called.

This is only not an XSA by luck.  rcu_unlock_domain() is a nop other than
decrementing the preempt count, and nothing reads the preempt count outside of
a debug build.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/grant_table.c